package cn.java78.springboot.myschool.pojo;

import java.util.ArrayList;
import java.util.List;

/**
 * @author oldliu
 * @since 1.0
 */
public class AjaxPage<T> {
    private int code=0;//0：表示成功，其他值含义。。。404,500,403重复了。。。
    private String msg;
    //当前页号
    private int page;
    //页大小
    private int count;
    //总条数
    private List<T> data=new ArrayList<>();
    public AjaxPage(){}

    public AjaxPage(int page, int count, List<T> data) {
        this.page = page;
        this.count = count;
        this.data = data;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
